/*var data=[];
data.push({
	'date':'2014-07-02',
	'img':'../img/touxiang.png',
	'courseName':'考研高频词汇第一讲',
	'keshiName':'课时1 ceed词族'
})
data.push({
	'date':'2014-07-03',
	'img':'../img/touxiang.png',
	'courseName':'考研高频词汇第一讲',
	'keshiName':'课时1 ceed词族'
})
data.push({
	'date':'2014-07-04',
	'img':'../img/touxiang.png',
	'courseName':'考研高频词汇第一讲',
	'keshiName':'课时1 ceed词族'
})
data.push({
	'date':'2014-08-02',
	'img':'../img/touxiang.png',
	'courseName':'考研高频词汇第一讲',
	'keshiName':'课时1 ceed词族'
})
data.push({
	'date':'2014-09-12',
	'img':'../img/touxiang.png',
	'courseName':'考研高频词汇第一讲',
	'keshiName':'课时1 ceed词族'
})
var g=function(id){
	return document.getElementById(id);
}
var g_tpl=function(id){
	return g('tpl_'+id).innerHTML;
}*/
//格式化一下数据
/*我要的数据格式
{
	2014:{
	   7:{
	     date:'2014-7-02',
	     year:'2014',
	     month:'7',
	     img:'',
	     courseName:'考研高频词汇 第一讲'
	     keshiName:"课时1 ceed词族"
	   }
	}
}
var data=[]
data.push({
	'date':'2014-07-02',
	'img':...zhanshipic,
	courseName;''
})
*/
/*var list={};
for(var i=0;i<data.legth;i++){
 var date=new Date(data[i].date);
 var year=date.getFullYear();
 var month=date.getMonth()+1;
 if(!list[year]){list[year]={}}
 if(!list[year][month]){ list[year][month]=[]}

var item=data[i];
item.year=year;
item.month=month;
list[year][month].push( item );
};
//时序菜单HTML生成
var html_scrubber_list=[];

var tpl_year=g_tpl('scrubber_year');
var tpl_month=g_tpl('scrubber_month');

for (y in list){
	var html_year=tpl_year.replace(/\{year\}/g,y);

	var html_month=[];
	for(m in list[y]){
		html_month.unshift(tpl_month,replace(/\{month\}/g,m));
	}
	html_year=html_year.replace(/\{list\}/g,html_month.join(''));

	html_scrubber_list.push(html_year);
}
g('scrubber').innerHTML=html_scrubber_list.join('');
//////
var html_cont_list=[];

var tpl_year=g_tpl('cont_year');
var tpl_month=g_tpl('cont_month');
var tpl_item=g_tpl('cont_item');
for (y in list){
	var html_year=tpl_year.replace(/\{year\}/g,y);

	var html_month=[];
	for(m in list[y]){
		html_month.unshift(tpl_month,replace(/\{month\}/g,m));
	}
	html_year=html_year.replace(/\{list\}/g,html_month.join(''));

	html_cont_list.push(html_year);
}
g('cont').innerHTML=html_cont_list.join('');*/

